package com.demo.modules.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.demo.common.Res;
import com.demo.common.utils.UserUtils;
import com.demo.modules.dto.QueryDTO;
import com.demo.modules.entity.HealthCode;
import com.demo.modules.service.HealthCodeService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (health_code)健康码表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("health")
public class HealthCodeController {
    /**
     * 服务对象
     */
    @Resource
    private HealthCodeService healthCodeService;

    /**
     * 获取个人健康码信息
     * @return
     */
    @GetMapping("info")
    public Res<HealthCode> info(){
        return Res.success(healthCodeService.getInfo(UserUtils.getUserId()));
    }
}
